xportethse 2.2.1
Loading...
Searching...
No Matches
XPort ETH SE Click Driver

API for configuring and manipulating XPort ETH SE Click driver. More...

Topics

 XPort ETH SE Device Settings
 Settings for registers of XPort ETH SE Click driver.
 XPort ETH SE MikroBUS Map
 MikroBUS pin mapping of XPort ETH SE Click driver.

Functions

void xportethse_cfg_setup (xportethse_cfg_t *cfg)
 XPort ETH SE configuration object setup function.
err_t xportethse_init (xportethse_t *ctx, xportethse_cfg_t *cfg)
 XPort ETH SE initialization function.
err_t xportethse_generic_write (xportethse_t *ctx, uint8_t *data_in, uint16_t len)
 XPort ETH SE data writing function.
err_t xportethse_generic_read (xportethse_t *ctx, uint8_t *data_out, uint16_t len)
 XPort ETH SE data reading function.
void xportethse_send_cmd (xportethse_t *ctx, uint8_t *cmd)
 XPort ETH SE send cmd function.
void xportethse_send_enter (xportethse_t *ctx)
 XPort ETH SE send enter function.
void xportethse_set_rst_pin (xportethse_t *ctx, uint8_t state)
 XPort ETH SE set RST pin function.
void xportethse_set_cts_pin (xportethse_t *ctx, uint8_t state)
 XPort ETH SE set CTS pin function.
uint8_t xportethse_get_rts_pin (xportethse_t *ctx)
 XPort ETH SE get RTS pin function.
uint8_t xportethse_get_dtr_pin (xportethse_t *ctx)
 XPort ETH SE get DTR pin function.
void xportethse_reset_device (xportethse_t *ctx)
 XPort ETH SE reset device function.

Detailed Description

API for configuring and manipulating XPort ETH SE Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ xportethse_cfg_setup()

void xportethse_cfg_setup ( xportethse_cfg_t * cfg)

XPort ETH SE configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See xportethse_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ xportethse_generic_read()

err_t xportethse_generic_read ( xportethse_t * ctx,
uint8_t * data_out,
uint16_t len )

XPort ETH SE data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See xportethse_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ xportethse_generic_write()

err_t xportethse_generic_write ( xportethse_t * ctx,
uint8_t * data_in,
uint16_t len )

XPort ETH SE data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See xportethse_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ xportethse_get_dtr_pin()

uint8_t xportethse_get_dtr_pin ( xportethse_t * ctx)

XPort ETH SE get DTR pin function.

This function returns the DTR pin logic state.

Parameters
[in]ctx: Click context object. See xportethse_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ xportethse_get_rts_pin()

uint8_t xportethse_get_rts_pin ( xportethse_t * ctx)

XPort ETH SE get RTS pin function.

This function returns the RTS pin logic state.

Parameters
[in]ctx: Click context object. See xportethse_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ xportethse_init()

err_t xportethse_init ( xportethse_t * ctx,
xportethse_cfg_t * cfg )

XPort ETH SE initialization function.

This function initializes all necessary pins and peripherals used for this Click board.

Parameters
[out]ctx: Click context object. See xportethse_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See xportethse_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ xportethse_reset_device()

void xportethse_reset_device ( xportethse_t * ctx)

XPort ETH SE reset device function.

This function resets device by toggling the RST pin state.

Parameters
[in]ctx: Click context object. See xportethse_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ xportethse_send_cmd()

void xportethse_send_cmd ( xportethse_t * ctx,
uint8_t * cmd )

XPort ETH SE send cmd function.

This function sends a command string by using UART serial interface.

Parameters
[in]ctx: Click context object. See xportethse_t object definition for detailed explanation.
[in]cmd: Command string to send.
Returns
None.
Note
None.

◆ xportethse_send_enter()

void xportethse_send_enter ( xportethse_t * ctx)

XPort ETH SE send enter function.

This function sends enter (new line) by using UART serial interface.

Parameters
[in]ctx: Click context object. See xportethse_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ xportethse_set_cts_pin()

void xportethse_set_cts_pin ( xportethse_t * ctx,
uint8_t state )

XPort ETH SE set CTS pin function.

This function sets the CTS pin logic state.

Parameters
[in]ctx: Click context object. See xportethse_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ xportethse_set_rst_pin()

void xportethse_set_rst_pin ( xportethse_t * ctx,
uint8_t state )

XPort ETH SE set RST pin function.

This function sets the RST pin logic state.

Parameters
[in]ctx: Click context object. See xportethse_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.